<template>
    <div>
        <div class="box_bg">
            <div class="source">
                 <!-- 选项卡  -->
                <el-tabs v-model="tab.selectTabName" type="border-card">
                    <el-tab-pane label="平时成绩" name="class" v-if="hasPermission('classScore:view')">
                        <class-score-list></class-score-list>
                    </el-tab-pane>
                    <el-tab-pane label="作业成绩" name="schoolCale" v-if="hasPermission('homeworkScore:view')">
                        <homework-score-list></homework-score-list>
                    </el-tab-pane>
                    <el-tab-pane label="考勤成绩" name="attendance" v-if="hasPermission('attendanceScore:view')">
                        <attendance-score-list></attendance-score-list>
                    </el-tab-pane>
                    <el-tab-pane label="综合成绩" name="comprehensive" v-if="hasPermission('comprehensiveScore:view')">
                        <comprehensive-score-list></comprehensive-score-list>
                    </el-tab-pane>
                </el-tabs>
            </div>
        </div>

    </div>
</template>

<script>
    import {config} from '@/config'
    import classScoreList from './class-score-list'   //课堂成绩
    import homeworkScoreList from './homework-score-list'    // 作业成绩
    import attendanceScoreList from './attendance-score-list'    //考勤成绩
    import comprehensiveScoreList from './comprehensive-score-list'    //综合成绩
    export default {
        components: {
            classScoreList,
            homeworkScoreList,
            attendanceScoreList,
            comprehensiveScoreList
        },
        data() {
            return {
                self: this,
                // 当前菜单id
                menuId: localStorage.getItem(config.SECOND_MENU_ID),
                // tab组件
                tab: {
                    selectTabName: 'class', //默认选中选项卡
                },
            };
        },
        created() {
            // 院校树初始化 获取全部院校列表数据
            this.getSchoolList();
        },
        mounted() {
        },
        methods: {
             // 获取院校数据
            getSchoolList() {
                this.$store.dispatch("getSchoolList");
            },
        },
    };
</script>
<style scoped>
    .text {
        font-size: 14px;
    }
    .item {
        margin-bottom: 18px;
    }
    .clearfix:before,
    .clearfix:after {
        display: table;
        content: "";
    }
    .clearfix:after {
        clear: both;
    }

</style>